home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
DELPHI32
/
BOXES
/
THSTCBO2
/
HCBTEST1.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-05-21
|
1KB
|
58 lines
unit Hcbtest1;
interface
uses
SysUtils, Windows, Messages, Classes, Graphics, Controls,
Forms, Dialogs, HstCbo, StdCtrls, ExtCtrls;
type
TfrmTestHistoryComboBox = class(TForm)
btRead: TButton;
btWrite: TButton;
Bevel1: TBevel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
procedure btReadClick(Sender: TObject);
procedure btWriteClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
HistoryComboBox1: THistoryComboBox;
public
{ Public-Deklarationen }
end;
var
frmTestHistoryComboBox: TfrmTestHistoryComboBox;
implementation
{$R *.DFM}
procedure TfrmTestHistoryComboBox.btReadClick(Sender: TObject);
begin
HistoryComboBox1.ReadRegistry;
ShowMessage('HistoryComboBox filled with information from Registry!');
end;
procedure TfrmTestHistoryComboBox.btWriteClick(Sender: TObject);
begin
HistoryComboBox1.WriteRegistry;
ShowMessage('HistoryComboBox and Registry updated with information from HistoryComboBox!');
end;
procedure TfrmTestHistoryComboBox.FormCreate(Sender: TObject);
begin
{ Create a HistoryComboBox 'on the fly' }
HistoryComboBox1 := THistoryCombobox.Create(Self);
HistoryComboBox1.Top := 16;
HistoryComboBox1.Left := 10;
HistoryComboBox1.Parent := frmTestHistoryComboBox;
HistoryComboBox1.MaxHistoryLength := 4;
HistoryComboBox1.Key := 'HCBTest\HistoryComboBox1';
end;
end.